<!--
 * @Descripttion: 
 * @version: @ 1.0.0
 * @Author: 朱江洲
 * @Date: 2022-04-25 10:02:07
 * @LastEditors: 朱江洲
 * @LastEditTime: 2022-04-25 13:40:27
-->
<template>
  <div class="app-container">
    <div class="header">
      <div class="bread">
        <span style="margin-left: 10px">关联商机管理</span>
      </div>
      <div>
        <el-button type="primary" size="default" @click="onSubmit">
          <span>保存</span>
        </el-button>
      </div>
    </div>
    <div class="tips">
      开启后,合同关联的商机通过审核后,该商机自动变为赢单状态,页面不可见.
      场景中选择已归档,才可以查看
    </div>
    <div style="margin-top: 20px">
      <div>
        <el-radio v-model="radio" :label="true">开启</el-radio>
      </div>
      <div style="margin-top: 20px">
        <el-radio v-model="radio" :label="false">不开启</el-radio>
      </div>
    </div>
  </div>
</template>

<script>
import { aboutEnable, aboutList } from "@/api/sys";
export default {
  data() {
    return {
      radio: true,
    };
  },

  created() {
    this.getList();
  },

  methods: {
    getList() {
      aboutList().then((res) => {
        this.radio = res.data;
      });
    },
     //   保存
    onSubmit() {
      aboutEnable({
        enable: this.radio,
      }).then((res) => {
        this.$message.success(res.msg);
        this.getList();
      });
    },
  },
};
</script>

<style lang="less" scoped>
.header {
  width: 100%;
  height: 74px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #ececec;
  .bread {
    font-size: 16px;
    font-family: PingFangSC-Medium, PingFang SC;
    font-weight: 500;
    color: #2b2b2b;
  }
}
.stageSet {
  font-size: 18px;
  color: #2b2b2b;
  font-weight: 700;
}
.table {
  height: 500px;
  overflow: auto;
  .table-header {
    margin-top: 10px;
    display: flex;
    width: 100%;
    justify-content: space-around;
    border: 1px solid #ececec;
    height: 40px;
    line-height: 40px;
    .table-header-title {
      text-align: center;
      width: 200px;
    }
  }
  .table-content {
    .table-content-main {
      display: flex;
      justify-content: space-around;
      height: 50px;
      align-items: center;
      border: 1px solid #ececec;
      border-top: none;
      .table-content-main-title {
        text-align: center;
        width: 240px;
      }
      .lastIpt {
        display: flex;
        align-items: center;
        i {
          margin-left: 10px;
        }
      }
    }
  }
}

.tips {
  margin-top: 20px;
  color: #2b2b2b;
}
</style>